<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>异步</title>
    <style>
        #test {
            width: 100px;
            height: 100px;
            border: 1px solid black;
        }
    </style>
</head>

<body>
    <div id="app">
        <div id="test" v-if=obj.flag></div>
        <button @click='test'>test</button>
    </div>
</body>
<script src="./js/vue.min.js"></script>
<script>
    let app = new Vue({
        el: '#app',
        data() {
            return {
                obj:{
                    flag:false
                }
            }
        },
        methods: {
            test() {
                this.obj.flag = true;
            }
        },
    })
</script>

</html>